#{extends 'CRUD/layout.html' /}
#{extends 'main.html' /}
#{set title: projectName+ '\'s ProductRoles '/}
#{set 'crumbs'}
<li><a href="/show/projects"> Projects </a></li>
<li><a href="/show/project?id=${id}"> ${projectName} </a></li>
<li><a href="/projects/${id}/productroles"> Product Roles </a></li>
#{/set}
#{set 'moreLinks'}
#{if connected.in(project).can('addProductRole')}
<p>
<a onclick="overlayOpen('/admin/projects/${id}/productroles/new')"href="#"> Add a new Product Role </a>
</p>
#{/if}
#{/set}
#{if flash.success}
<p class="success" style="color:gray">&{flash.success}</p>
#{/if}


<p class="crudDelete">
<h2> ${projectName}'s Product Roles </h2>

#{if connected.in(project).can('addProductRole')}
<p>
<a onclick="overlayOpen('/admin/projects/${id}/productroles/new')"href="#"><img src="@{'/public/images/famfam/add.png'}" title="Add a Product Role"></a>
</p>
#{/if}

<ul id="productRoles" >
#{if !(noProductRoles)}
#{list items:productRoles, as:'productRole'}
   #{if !productRole.deleted}
	<li id="productRole_${productRole.name}" >
		<span id= "productRole_${productRole.name}">
			<a href="/productroles/${productRole.id}">${productRole.name}</a> 
		    <br>
		</span>  
	</li>
    #{/if} 
#{/list}
#{/if}

#{if noProductRoles}
   <p style="color:gray"> This project has no Product roles. </p>
#{/if}
</ul>
</p>

<a href="/show/project?id=${id}">Back to ${projectName}</a>